﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Yz.Base
{
    /// <summary>
    /// 附件基类，不做数据库映射
    /// </summary>
    public class FileModel : BaseEntity
    {
        /// <summary>
        /// 文件名称
        /// </summary>
        [MaxLength(50)]
        public string Name { get; set; }
        /// <summary>
        /// 原文件路径
        /// </summary>
        [MaxLength(300)]
        public string Path { get; set; }
        /// <summary>
        /// 缩略图路径
        /// </summary>
        [MaxLength(300)]
        public string ThPath { get; set; }
        /// <summary>
        /// 文件类型
        /// </summary>
        public FileType FileType { get; set; }
        /// <summary>
        /// 文件后缀名
        /// </summary> 
        [MaxLength(10)]
        public string FileSuffix { get; set; }
    }
    /// <summary>
    /// 附件基类，不做数据库映射
    /// </summary>
    public class FileEntity : FileModel
    {
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateDate { get; set; } = DateTime.Now;
    }
}
